﻿﻿<!DOCTYPE html>

<html lang="en">
	<!--<![endif]-->
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
		<meta name="description" content="" />
		<meta name="author" content="" />
		<!--[if IE]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <![endif]-->
		<title>Support Admin</title>
		<!-- BOOTSTRAP CORE STYLE CSS -->
		<link rel="stylesheet" href="../static/css/bootstrap.min.css" />
		<!-- FONT AWESOME CSS -->
		<link href="../static/css/font-awesome.min.css" rel="stylesheet" />
		<!-- CUSTOM STYLE CSS -->
		<link href="../static/css/style.css" rel="stylesheet" />
		<!-- Google	Fonts -->
		<link href='http://fonts.googleapis.com/css?family=Nova+Flat' rel='stylesheet' type='text/css' />
		<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,300' rel='stylesheet' type='text/css' />
	</head>
	<body>
		<div id="head">
			<div class="container">
				<div class="row">
					<div class="col-lg-4 col-md-4 col-sm-4">
						<a href="../template/inner_index.html"><img src="../static/img/LOGE.png" /></a>
					</div>
					<a href="personal.html"><img src="../static/img/头像1.jpg" id="personal"></a>
				</div>
			</div>
		</div>
		<section id="main">
			<div class="container">
				<div class="row">
					<div class="col-lg-9 col-md-9 col-sm-9">
						<h3> 
                       	<form class="form-search">
						ID   <input type="text" class="search">
							  <button type="submit" class="btn">Search</button>
							</form>
						<div class="dropdown ">
                        Group <span style="cursor: pointer;" id="group" class="label label-info"  data-toggle="dropdown" data-target="#">所有组</span> 
                            <ul class="dropdown-menu group">
								    <li ><a data-toggle="tab" href="#">组</a></li>
							</ul>
                   		 </div>
                   		<div class="dropdown">
                       	Subject <span style="cursor: pointer;" id="subject" class="label label-warning" data-toggle="dropdown" data-target="#">所有方向</span>
                       	    <ul  class="dropdown-menu  subject">
								<li ><a data-toggle="tab" href="#">方向</a></li>
							</ul>
                       </div>
                  	    </h3>
                        {% for blog in blogs %}
						<div class="panel panel-default">
							<div class="panel-heading">
                                <h3><a href="{{ url('blog_detail', args=(blog.pk, ))}}">{{ blog.title }}</a></h3>
								<strong class="label label-success">{{ (page_of_blogs.number-1)*2+loop.index}}</strong>
								<strong class="label label-info">By {{ blog.author }}</strong>
								<strong class="label label-warning">{{ blog.group_id }}</strong>
								<strong class="label label-default">{{ blog.subject_id }}</strong>
                                <span class="label label-danger pull-right">Date:{{ blog.time.strftime("%Y-%m-%d")}}</span>
                            </div>
							<div class="panel-body">
								{{ blog.context|truncate(100, True)}}
							</div>
						</div>
                        {% endfor %}


                    <nav aria-label="Page navigation">
                        <ul class="pagination">
                        <li>
                        {% if page_of_blogs.has_previous() %}
                            <span aria-hidden="true">
                                <a href="?page={{page_of_blogs.previous_page_number()}}" aria-label="Previous">&laquo; </a>
                            </span>
                        {%  else %}
                            <span aria-hidden="true">&laquo;</span>
                        {%  endif %}
                        </li>

                        {% for page_num in page_range %}
                            {% if page_num == page_of_blogs.number %}
                                <li class="active"><span>{{ page_num }}</span></li>
                            {% else %}
                                {% if page_num == '...' %}
                                    <li><span>{{ page_num }}</span></li>
                                {% else %}
                                    <li><a href="?page={{ page_num }}">{{ page_num }}</a></li>
                                {% endif %}
                            {% endif %}
                        {% endfor %}
                        <li>
                        {% if page_of_blogs.has_next() %}
                            <a href="?page={{ page_of_blogs.next_page_number()}}"
                               aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                            </a>
                        {%  else %}
                            <span aria-hidden="true">&raquo;</span>
                        {%  endif %}
                        </li>
                        </ul>
                    </nav>
                    <p>
                        共有{{ page_of_blogs.paginator.count }}篇博客
                        当前第{{ page_of_blogs.number }}页
                        共{{ page_of_blogs.paginator.num_pages }}页
                    </p>

						<a class="form-group col-lg-12 col-md-12 col-sm-12" href="#">
							<button type="submit" class="btn btn-primary">书写博文</button>
						</a>
					</div>
					<div class="col-lg-3 col-md-3 col-sm-3">
						<div class="list-group">
							<a href="{{url('inner_home')}}" class="list-group-item">内部网站首页
							</a>
							<a href="{{url('blog_list')}}" class="list-group-item active">公共博客</a>
							<a href="resource.html" class="list-group-item">资源夹</a>
							<a href="question.html" class="list-group-item">技术问答</a>
							<a href="index.html" class="list-group-item">实验室介绍页</a>
						</div>
						<div class="alert alert-danger text-center">
							<h3>Import Information</h3> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla pretium lectus vel justo iaculis blandit.
						</div>
					</div>
				</div>
			</div>
		</section>
		<div id="footer">
			<div class="container">
				<div class="row">
					<div class="col-lg-6 col-md-6 col-sm-6">
						<h3>Organisation</h3>
						<p>
							湖南工业大学创新创业中心（实验室）
							<br /> &copy; 2017 开发&维护| 实验室前端组
						</p>
					</div>
					<div class="col-lg-6 col-md-6 col-sm-6">
						<h3>Get Quick Help</h3>
						<h4><span>QQ: </span>243462062（方）/947340410（黎）</h4>
						<h4><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>2757244276（张）/1456073180（刘）</h4
					</div>
				</div>
			</div>
		</div>
		<!--  Jquery Core Script -->
		<script src="../static/js/jquery-1.10.2.js"></script>
		<!--  Core Bootstrap Script -->
		<script type="text/javascript" src="../static/js/bootstrap-dropdown.js"></script>
		<script src="../static/js/bootstrap.min.js"></script>
		<script>
			$(".group li").click(function() {
				var val = $(this).text();
				document.getElementById("group").innerHTML = val;
			});
			$(".subject li").click(function() {
				var val = $(this).text();
				document.getElementById("subject").innerHTML = val;
			});
		</script>
	</body>
</html>